public class phone {
    public void charging(Voltage5v voltage5v){
        if(voltage5v!=null){
            if (voltage5v.output5V()==5){
                System.out.println("此时电压为5V,可以正常充电");
            }else {
                System.out.println("此时电压不正常,不能充电");
            }
        }
    }
}
